import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView
  },
  {
    path: '/user',
    name: 'user',
    component: () => import(/* webpackChunkName: "about" */ '../views/MyUser.vue'),
    children:[
      {
        path:'change',
        component:()=>{'../views/UserChange.vue'}
      }
    ]
  },
  {
    path: '/login',
    name: 'login',
    component: () => import(/* webpackChunkName: "about" */ '../views/MyLogin.vue')
  },
   {
    path: '/register',
    name: 'register',
    component: () => import(/* webpackChunkName: "about" */ '../views/MyRegister.vue')
  },
  {
    path: '/order',
    name: 'order',
    component: () => import(/* webpackChunkName: "about" */ '../views/MyOrder.vue'), 
  },
  {
    path: '/detail',
    name: 'detail',
    component: () => import(/* webpackChunkName: "about" */ '../views/HotelDetail.vue'), 
  },
  {
    path: '/nopay',
    name: 'nopay',
    component: () => import(/* webpackChunkName: "about" */ '../views/NoPay.vue'), 
  },
  {
    path: '/paying',
    name: 'paying',
    component: () => import(/* webpackChunkName: "about" */ '../views/NowPaying.vue'), 
  },
  {
    path: '/list',
    name: 'list',
    component: () => import(/* webpackChunkName: "about" */ '../views/HotelList.vue')
  },
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
